
namespace Org.Loon.Framework.Xna.Game.Core.Graphics.OpenGL.Particle
{
    using System;
    using System.Collections.Generic;
    using System.Text;
    using Microsoft.Xna.Framework;
    using Microsoft.Xna.Framework.Graphics;

    public class ExplosionParticleSystem : ParticleSystem
    {
        public ExplosionParticleSystem(Game game, int howManyEffects)
            : base(game, howManyEffects)
        { }

        protected override void InitializeConstants()
        {

            minInitialSpeed = 10;
            maxInitialSpeed = 20;

            minAcceleration = -30;
            maxAcceleration = -40;

            minLifetime = 1.0f;
            maxLifetime = 1.5f;

            minScale = 0.5f;
            maxScale = 1.0f;

            minNumParticles = 3;
            maxNumParticles = 7;

            minRotationSpeed = 0;
            maxRotationSpeed = 0;

        }

        protected override void InitializeParticle(Particle p, Vector2 where)
        {
            base.InitializeParticle(p, where);
            p.Acceleration = -p.Velocity / p.Lifetime;
        }
    }
}
